package geektime.spring.data.datasourcedemo;

import java.util.concurrent.TimeUnit;

public class TaskUtil {
    public static void doTask(String taskName) throws InterruptedException {
        System.out.printf("--- [%s] start task [%s] ---\n",
                Thread.currentThread().getName(), taskName);
        TimeUnit.SECONDS.sleep(1);
        System.out.printf("--- [%s] finish task [%s] ---\n",
                Thread.currentThread().getName(), taskName);
    }
}
